package com.qk.management.mapper;

import com.qk.domain.user.UserDo;
import com.qk.dto.user.UserDto;
import com.qk.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    List<UserDo> getUsers(UserDto userDto);
    void insert(User user);

    void deleteUser(List<Integer> ids);
    @Select("select * from user where id=#{userid}")
    User selectById(Integer userid);
    @Select("select * from user")
    List<User> selectList();

    List<User> selectByRole(String roleLabel);

    List<User> selectByDept(Integer deptId);

    void updateUser(User user);
    @Select("select * from user where username=#{username}")
    User selectByuserName(String username);
}
